home *** CD-ROM | disk | FTP | other *** search
/ Collection of Tools & Utilities / Collection of Tools and Utilities.iso / edit / tde40.zip / tdefunc.h < prev    next >
C/C++ Source or Header  |  1994-06-05  |  20KB  |  534 lines

  1. /*
  2.  * New editor name:  TDE, the Thomson-Davis Editor.
  3.  * Author:           Frank Davis
  4.  * Date:             June 5, 1991
  5.  *
  6.  * This modification of Douglas Thomson's code is released into the
  7.  * public domain, Frank Davis.  You may distribute it freely.
  8.  *
  9.  * This file contains all prototypes for every function in tde.  It should
  10.  * be included in every source code module.
  11.  *
  12.  * I'm so stupid, I can't keep up with which functions are used in which
  13.  * files.  Let's gather all prototypes into one file, so I don't have
  14.  * to remember too much.
  15.  */
  16.  
  17.  
  18. /***********************  function prototypes in bj_ctype.c *************/
  19. int  bj_tolower( int );
  20. int  bj_toupper( int );
  21. /************************************************************************/
  22.  
  23.  
  24. /*************************  function prototypes in block.c *************/
  25. int  mark_block( TDE_WIN * );
  26. int  unmark_block( TDE_WIN * );
  27. void restore_marked_block( TDE_WIN *, int );
  28. int  prepare_block( TDE_WIN *, line_list_ptr, int );
  29. int  pad_dest_line( TDE_WIN *, file_infos *, line_list_ptr );
  30. int  move_copy_delete_overlay_block( TDE_WIN * );
  31. void do_line_block( TDE_WIN *,  TDE_WIN *,  int,  file_infos *,  file_infos *,
  32.                     line_list_ptr,  line_list_ptr,  line_list_ptr,
  33.                     line_list_ptr,  long,  long,  int * );
  34. void do_stream_block( TDE_WIN *,  TDE_WIN *,  int,  file_infos *,
  35.                       file_infos *,  line_list_ptr,  line_list_ptr,
  36.                       line_list_ptr,  line_list_ptr,
  37.                       long,  long,  long,  int,  int,  int,  int * );
  38. void do_box_block( TDE_WIN *,  TDE_WIN *,  int,  file_infos *,  file_infos *,
  39.                    line_list_ptr, line_list_ptr,  long,  long, long,
  40.                    long,  long,  int,  int, int,
  41.                    int,  int,  int,  int,  int * );
  42. void load_box_buff( char *, line_list_ptr, int, int, char );
  43. int  copy_buff_2file( TDE_WIN *, char *, line_list_ptr, int, int, int );
  44. void block_fill( char *, int, int );
  45. void number_block_buff( char *, int, long, int );
  46. void restore_cursors( file_infos * );
  47. int  delete_box_block( TDE_WIN *, line_list_ptr, int, int );
  48. void check_block( void );
  49. void find_begblock( file_infos * );
  50. void find_endblock( file_infos * );
  51. int  block_write( TDE_WIN * );
  52. int  block_print( TDE_WIN * );
  53. int  get_block_fill_char( TDE_WIN *, int * );
  54. int  get_block_numbers( TDE_WIN *, long *, long *, int * );
  55. int  block_trim_trailing( TDE_WIN * );
  56. int  block_email_reply( TDE_WIN * );
  57. int  block_convert_case( TDE_WIN * );
  58. void upper_case( text_ptr, size_t );
  59. void lower_case( text_ptr, size_t );
  60. void rot13( text_ptr, size_t );
  61. void fix_uue( text_ptr, size_t );
  62. void strip_hi( text_ptr, size_t );
  63. /************************************************************************/
  64.  
  65. /**********************  function prototypes in capslock.c  **************/
  66. int  capslock_active( void );
  67. int  nothing( TDE_WIN * );
  68. /************************************************************************/
  69.  
  70. /**********************  function prototypes in config.c   ***************/
  71. int  tdecfgfile( TDE_WIN * );
  72. void remove_cr( char * );
  73. void parse_line( char *, int );
  74. char *parse_token( char *, char * );
  75. int  search( char *, CONFIG_DEFS *, int );
  76. void parse_macro( int , char *, int );
  77. int  parse_literal( int, char *, char *, char ** );
  78. void initialize_macro( int );
  79. void clear_previous_macro( int );
  80. void check_macro( int );
  81. int  cfg_record_keys( int, int, int );
  82. void new_sort_order( unsigned char *, unsigned char * );
  83. int  get_stroke_count( void );
  84. int  cfg_getfunc( int );
  85. void clear_previous_twokey( int );
  86. int  insert_twokey( int, int, int );
  87. /************************************************************************/
  88.  
  89. /**********************  function prototypes in console.c  **************/
  90. void video_config( struct vcfg *cfg );
  91. int  getkey( void );
  92. int  waitkey( int );
  93. void flush_keyboard( void );
  94. void xygoto( int, int );
  95. void update_line( TDE_WIN * );
  96. void c_output( int, int, int, int );
  97. void s_output( char FAR *, int, int, int );
  98. void eol_clear( int, int, int );
  99. void window_eol_clear( TDE_WIN *, int );
  100. void hlight_line( int, int, int, int );
  101. void cls( void );
  102. void set_cursor_size( int );
  103. void set_overscan_color( int );
  104. #if defined( __UNIX__ )
  105. void save_screen_line( int, int, chtype * );      /* chtype is in curses.h */
  106. void restore_screen_line( int, int, chtype * );   /* chtype is in curses.h */
  107. void save_minor_area( chtype *, int, int, int, int );
  108. void restore_minor_area( chtype *, int, int, int, int );
  109. #else
  110. void save_screen_line( int, int, char * );
  111. void restore_screen_line( int, int, char * );
  112. void save_minor_area( int *, int, int, int, int );
  113. void restore_minor_area( int *, int, int, int, int );
  114. #endif
  115. int  getfunc( int );
  116. int  two_key( TDE_WIN * );
  117. int  getanswerkey( void );
  118. /************************************************************************/
  119.  
  120.  
  121. /*************************  function prototypes in diff.c  **************/
  122. int  define_diff( TDE_WIN * );
  123. int  repeat_diff( TDE_WIN * );
  124. int  differ( int, int, int );
  125. int  skip_leading_space( text_ptr, int );
  126. line_list_ptr skip_eol( line_list_ptr, int *, int *, long *, long * );
  127. void show_diff_window( TDE_WIN * );
  128. int  verify_number( char *, int * );
  129. int  verify_letter( char *, int *, TDE_WIN ** );
  130. /************************************************************************/
  131.  
  132.  
  133. /*************************  function prototypes in dirlist.c *************/
  134. int  dir_help( TDE_WIN * );
  135. int  dir_help_name( TDE_WIN *, char * );
  136. void FAR *my_calloc( unsigned, unsigned );
  137. int  validate_path( char *, char * );
  138. int  list_and_pick( char *, char *, TDE_WIN * );
  139. void setup_directory_window( DIRECTORY *, int );
  140. void recalculate_dir( DIRECTORY *, FTYPE *, int );
  141. void write_directory_list( FTYPE *, DIRECTORY );
  142. int  select_file( FTYPE *, char *, DIRECTORY * );
  143. void shell_sort( FTYPE *, int );
  144. /************************************************************************/
  145.  
  146.  
  147. /*************************  function prototypes in ed.c *****************/
  148. int  insert_newline( TDE_WIN * );
  149. int  insert_overwrite( TDE_WIN * );
  150. int  join_line( TDE_WIN * );
  151. int  dup_line( TDE_WIN * );
  152. int  word_delete( TDE_WIN * );
  153. int  back_space( TDE_WIN * );
  154. int  line_kill( TDE_WIN * );
  155. int  char_del_under( TDE_WIN * );
  156. int  eol_kill( TDE_WIN * );
  157. int  undo_line( TDE_WIN * );
  158. int  undo( TDE_WIN * );
  159. int  beg_next_line( TDE_WIN * );
  160. int  next_line( TDE_WIN * );
  161. int  home( TDE_WIN * );
  162. int  goto_eol( TDE_WIN * );
  163. int  goto_top( TDE_WIN * );
  164. int  goto_bottom( TDE_WIN * );
  165. int  set_tabstop( TDE_WIN * );
  166. void show_line_col( TDE_WIN * );
  167. void show_asterisk( TDE_WIN * );
  168. int  toggle_overwrite( TDE_WIN * );
  169. int  toggle_smart_tabs( TDE_WIN * );
  170. int  toggle_indent( TDE_WIN * );
  171. int  set_left_margin( TDE_WIN * );
  172. int  set_right_margin( TDE_WIN * );
  173. int  set_paragraph_margin( TDE_WIN * );
  174. int  toggle_ww( TDE_WIN * );
  175. int  toggle_crlf( TDE_WIN * );
  176. int  toggle_trailing( TDE_WIN * );
  177. int  toggle_z( TDE_WIN * );
  178. int  toggle_eol( TDE_WIN * );
  179. int  toggle_search_case( TDE_WIN * );
  180. int  toggle_sync( TDE_WIN * );
  181. int  toggle_ruler( TDE_WIN * );
  182. int  toggle_tabinflate( TDE_WIN * );
  183. void cursor_sync( TDE_WIN * );
  184. void editor( void );
  185. void display_dirty_windows( TDE_WIN * );
  186. void show_dirty_window( TDE_WIN * );
  187. /************************************************************************/
  188.  
  189.  
  190. /*************************  function prototypes in file.c  **************/
  191. int  write_file( char *, int, file_infos *, long, long, int );
  192. int  hw_save( char *, file_infos *, long, long, int );
  193. int  hw_append( char *, file_infos *, long, long, int );
  194. int  load_file( char *, file_infos *, int *, int );
  195. void insert_node( file_infos *, line_list_ptr, line_list_ptr );
  196. int  show_file_2big( char *, int, line_list_ptr, text_ptr );
  197. int  backup_file( TDE_WIN * );
  198. int  edit_file( char *, int, int );
  199. int  edit_another_file( TDE_WIN * );
  200. int  attempt_edit_display( char *, int, int, int );
  201. int  file_file( TDE_WIN * );
  202. int  save_file( TDE_WIN * );
  203. int  save_backup( TDE_WIN * );
  204. int  save_as_file( TDE_WIN * );
  205. #if defined( __UNIX__ )
  206. void make_backup_fname( file_infos * );
  207. int  write_to_disk( TDE_WIN *, char * );
  208. int  search_and_seize( TDE_WIN * );
  209. int  edit_next_file( TDE_WIN * );